package lab02.test30;

import java.util.Scanner;

public class Test30 {
    public static void main(String[] args) {

        Scanner sc = new Scanner(System.in);
        System.out.println("输入数组长度：");

        int n = sc.nextInt();
        double[] arr = new double[n];

        //从键盘录入分数，及数组值求和
        System.out.println("请输入分数：");
        double sum = 0;
        for (int i = 0; i < arr.length; i++) {
            arr[i] = sc.nextInt();
            sum += arr[i];
        }

        double average = sum / arr.length;

        System.out.println("平均分：" + average);

    }
}
